package com.example.demo.dao;

import com.example.demo.bean.Area;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Optional;

/**
 * @Author:linchong
 * @CreateTime:2020-03-30 10:57
 * @Description:
 */
public interface AreaRepository extends JpaRepository<Area, String> {


	@Override
	@EntityGraph(value = "Area.Graph", type = EntityGraph.EntityGraphType.FETCH)
	Optional<Area> findById(String s);
}
